package com.ajk.server.model.query;

/**
 * 用户表  <br>
 * t_users <br>
 * v1.0 2016-05-01
 */
 public class UsersQuery extends Paging {
	 
	 private Integer userId;
	 
	 private String keyword;
	 
	 private Integer role;
	 
	 /**
	 * 
	 */
	private static final long serialVersionUID = -544008151971128564L;
	private String mobile;

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public String getKeyword() {
		return keyword;
	}

	public void setKeyword(String keyword) {
		this.keyword = keyword;
	}
	
	public Integer getRole() {
		return role;
	}

	public void setRole(Integer role) {
		this.role = role;
	}

	@Override
	public void dealWith() {
		super.dealWith();
		if(this.keyword!=null && this.keyword.trim().length()>0){
			if(!keyword.startsWith("%")){
				this.keyword = "%"+this.keyword;
			}
			if(!keyword.endsWith("%")){
				this.keyword = this.keyword+"%";
			}
		}else{
			this.keyword = null;
		}
	}
	 
}	